<?php 
	include('template/header.php');
	include('classess/user_subscribe.php');
	include('classess/user_invoice.php');
	//include('css/invoice.css');
?>
<?php  
	$invoice_user = new invoiceUser();
       
	if(isset($_GET['user_id'])){
            $user_id = $_GET['user_id'];
		$invoiceUser = '';
		/*if(isset($_POST['bank_name']) && $_POST['bank_name'] != ''){
		
			$manageUser = $manage_user->bankdetail_add($affiliate_id);
			
		}*/
		$user_detail = $invoice_user->get_details($user_id);
		//echo $user_detail[0]->address;		
		//echo '<pre>'; print_r($user_detail);exit;
		
	} else {
		header('location:index.php');
	}
 ?>
	<link href="css/invoice.css" rel="stylesheet">
	<section  class="homepage-slider" id="home-slider">
		<div class="flexslider">
			<ul class="slides">
				<li>
					<img src="img/slider/first_image.jpg" alt="No Image" />					
				</li>
				<li>
					<img src="img/slider/second_image.jpg" alt="No Image" />					
				</li>
			</ul>
		</div>			
	</section>	
	<section class="main-content">
		<div class="row">
			
			<div class="span9">													
				<div class="row">
					<div class="span9">
						
						<h4 class="title">
							<span class="pull-left">
								<span class="text">
									<span class="line">
										<strong>Thank You</strong>
									</span>
								</span>
							</span>
							<span class="pull-right">
								
							</span>
						</h4>	
						
						<div class="thnx_msg"><b>Thank you For subscribing</b></div>
						
						<div class="in_wrapper">
							<div class="in_carsoul">
								<div class="in_col-lg-5">
									
									<p>
										<!--BILL TO <br>-->
										<?php echo $user_detail[0]->name; ?><br>
										<?php echo $user_detail[0]->address; ?><br>
										<?php echo $user_detail[0]->city; ?><br>
										<?php echo $user_detail[0]->state; ?><br>
									</p>
								</div>
								
								<div class="in_col-lg-6">
									<p>
										INVOICE NO : <?php echo "RV".$user_detail[0]->user_id; ?> <br>
										DATE: <?php echo date('d-m-Y',strtotime($user_detail[0]->create_ts)); ?>
									</p>
								</div>
							</div>  <!-- end in_carsoul  -->
						  
							<div class="in_head">
								<!--<span>Payment Method</span>-->
							</div>
							  
							<div class="in_inner">
								<table>
									<tr class="in_row">
										<th class="in_th">Course Name</th>
										<th>Course Fee</th>
									</tr>
									
									<tr>
										<td class="in_navbar"><?php 
                                                                                if($user_detail[0]->is_ebook == 1 ){
                                                                                    echo $user_detail[0]->ebook_name;
                                                                                }else{
                                                                                    echo $user_detail[0]->course_name;
                                                                                }
                                                                                 ?></td>
										<td>$ <?php if($user_detail[0]->is_ebook == 1 ){
                                                                                    echo $user_detail[0]->ebook_fee;
                                                                                }else{
                                                                                   echo $user_detail[0]->course_fee;
                                                                                }
                                                                                 ?></td>
									</tr>
									
								</table>
								
								<div class="in_footer">
									<div class="in_total">
										<div class="in_col-6">
											Total:
										</div>
										<div class="in_col-7">
                                                                                        $ <?php echo $user_detail[0]->course_fee; ?>
										</div>
									</div>
								</div>  <!-- end footer  -->
							</div>
							<div class="copyrights">
								<p>
									For Support:<a href="mailto:support@rvtraining.net">
									support@rvtraining.net
									</a>
								</p>
							</div>
						</div>
					</div>						
				</div>	
			</div>
			<?php include('template/right_panel.php'); ?>
		</div>
	</section>
   
<?php include('template/footer.php'); ?>